<template>
    <wit-content>
      <view>
        <wit-custom>
          <template v-slot:content>
            <text>导航栏</text>
          </template>
          <template v-slot:left>
            <text class="icon-weixin font-size-xl"></text>
          </template>
          <template v-slot:right>
            <text class="icon-aliyun font-size-xl"></text>
          </template>
        </wit-custom>
        <wit-row justify="center" style="margin-top: 100px">
          <wit-col :span="4">
            <view class="" style="background: linear-gradient(135deg,#fce38a,#f38181)">好</view>
          </wit-col>
          <wit-col :span="4">
            <view class="" style="background: linear-gradient(135deg,#fce38a,#f38181)">好</view>
          </wit-col>
          <wit-col :span="4">
            <view class="" style="background: linear-gradient(135deg,#fce38a,#f38181)">好</view>
          </wit-col>
          <wit-col :span="4">
            <view style="background: linear-gradient(135deg,#fce38a,#f38181)">好</view>
          </wit-col>
        </wit-row>
        <wit-row justify='between' style="margin-top: 100px">
          <wit-col :span="5" :gutter="10">
            <view class="" style="background: linear-gradient(135deg,#fce38a,#f38181)">好</view>
          </wit-col>
          <wit-col :span="5" :gutter="10">
            <view style="background: linear-gradient(135deg,#fce38a,#f38181)">好</view>
          </wit-col>
        </wit-row>
        <view class="content">
          <button size="mini" @click="logins">登录</button>
          <button size="mini" @click="test">接口</button>
          <wit-button size="mini" icon="icon-buju" color="color-red" @click="demo('layout')">layout</wit-button>
          <button size="mini" @click="demo('button')">button</button>
          <button size="mini" @click="demo('grid')">grid</button>
          <button size="mini" @click="demo('icon')">icon</button>
        </view>
        <wit-tabBar></wit-tabBar>
      </view>
    </wit-content>
</template>

<script lang="ts" setup>
import { getUserList } from "@/plugins/api/user";
import { useTheme } from '@/store/pinia/modules/theme'
import { useUser } from '@/store/pinia/modules/user'

const themeStore = useTheme();
const userStore = useUser();
const { login } = userStore;
const { storeColor } = themeStore;
const logins = () =>{
  let username = 'admin'
  let password = '123456'
  login({username, password})
}
const test = () => {
  getUserList({}).then(res => {
    console.log(res)
  })
}
const demo = (e: string|object) => {
  console.log(e)
  uni.navigateTo({
    url: '../../demo/'+ e
  })
}
</script>

<style>
</style>
